package com.lightman.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lightman.common.utils.PageUtils;
import com.lightman.gulimall.product.entity.AttrEntity;
import com.lightman.gulimall.product.vo.AttrGroupRelationVo;
import com.lightman.gulimall.product.vo.AttrRespVo;
import com.lightman.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author lightman
 * @email 1355208467@qq.com
 * @date 2020-12-23 07:17:14
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId);

    PageUtils querSaleAttrPage(Map<String, Object> params, Long catelogId);

//    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    // 根据分组id 找到组内 关联信息
    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteAttrgroupRelationEntity(AttrGroupRelationVo... vos);

    // 获取属性分组没有关联的其他属性
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    //  在指定的所有属性集合里面,挑出检索属性
    List<Long> selectSearchAttrIds(List<Long> attrIds);
}

